package javacafe.action.factory;

import javacafe.action.seminar.AddSeminarAction;
import javacafe.action.seminar.BeforeAddSeminarAction;
import javacafe.action.seminar.BeforeUpdateSeminarAction;
import javacafe.action.seminar.DeleteSeminarAction;
import javacafe.action.seminar.DetailSeminarAction;
import javacafe.action.seminar.SeminarAction;
import javacafe.action.seminar.SeminarCarendarAction;
import javacafe.action.seminar.UpdateSeminarAction;
import javacafe.action.workshop.AddWorkshopAction;
import javacafe.action.workshop.BeforeAddWorkshopAction;
import javacafe.action.workshop.BeforeUpdateWorkshopAction;
import javacafe.action.workshop.DeleteWorkshopAction;
import javacafe.action.workshop.DetailWorkshopAction;
import javacafe.action.workshop.UpdateWorkshopAction;
import javacafe.action.workshop.WorkshopAction;
import javacafe.action.Action;
import javacafe.action.ActionFactory;



public class EventActionFactory implements ActionFactory {
	private static EventActionFactory factory;
	
	public static EventActionFactory getInstance(){
		if(factory==null){
			factory=new EventActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("seminar")){
			action=new SeminarAction();
		}else if(command.equalsIgnoreCase("calendar")){
			action=new SeminarCarendarAction();
		}else if(command.equalsIgnoreCase("addseminarform")){
			action=new BeforeAddSeminarAction();
		}else if(command.equalsIgnoreCase("addseminar")){
			action=new AddSeminarAction();
		}else if(command.equalsIgnoreCase("detail")){
			action=new DetailSeminarAction();
		}else if(command.equalsIgnoreCase("updateseminarform")){
			action=new BeforeUpdateSeminarAction();
		}else if(command.equalsIgnoreCase("updateseminar")){
			action=new UpdateSeminarAction();
		}else if(command.equalsIgnoreCase("deleteseminar")){
			action=new DeleteSeminarAction();
		}else if(command.equalsIgnoreCase("workshop")){
			action=new WorkshopAction();
		}else if(command.equalsIgnoreCase("detailworkshop")){
			action=new DetailWorkshopAction();
		}else if(command.equalsIgnoreCase("addworkshopform")){
			action=new BeforeAddWorkshopAction();
		}else if(command.equalsIgnoreCase("addworkshop")){
			action=new AddWorkshopAction();
		}else if(command.equalsIgnoreCase("updateworkshopform")){
			action=new BeforeUpdateWorkshopAction();
		}else if(command.equalsIgnoreCase("updateworkshop")){
			action=new UpdateWorkshopAction();
		}else if(command.equalsIgnoreCase("deleteworkshop")){
			action=new DeleteWorkshopAction();
		}
		return action;
	}//
}
